Natural language interfaces may be utilized to translate questions written in a natural language into a suitable database query language, such as structured query language (“SQL”). In turn, a database management system may return the results of the query to a user. Such translation may be carried out using a semantic model that defines how the data is arranged in the database. The semantic model may comprise associations between certain keywords and database attributes (e.g., customer or employee.). In turn, the database attributes may be associated with a database property type (e.g., table or column). These associations of the semantic model may be adjusted to reflect changes in the underlying database model.
By way of example, a user may enter “What is the salary of the employee Mary?” “Mary” may be the value of a column termed “FIRST_NAME” in a record of a database table termed “EMPLOYEE.” The semantic data model may include an association between the keyword “Mary” and the string “EMPLOYEE.FIRST_NAME.” In turn, the string “EMPLOYEE.FIRST_NAME” may be associated with a string “VALUE” that represents a database property type. These associations may notify suitable translation software that a column termed “FIRST_NAME” whose value is “Mary” exists in a record of a table called “EMPLOYEE.” The keyword “Salary” may be associated with the string “EMPLOYEE.SALARY.” In turn, the string “EMPLOYEE.SALARY” may be associated with the string “COLUMN.” These latter associations may notify suitable translation software that a column named “SALARY” exists in a database table named “EMPLOYEE.” The foregoing associations may be used to construct expressions of a database language query.